    package com.jiruan.invoicemanagementsystem.vo;

    import java.math.BigDecimal;

    public class StatisticalInfoShow {
        //总计可开票金额: 固定20,000,0.00元
        private static final Double totalInvoiceAmount = 200000.00;
        //历史已开票金额:开票记录表中，算出的所有发票的开票金额总和
        //tao: Total amount of
        private String taoHistoricalInvoice;
        //可开票金额: (总计金额 - 已开票金额)
        private String canInvoiceAmount;

        public StatisticalInfoShow() {
        }
        public StatisticalInfoShow(String taoHistoricalInvoice, String canInvoiceAmount) {  //设置历史金额，可开票金额
            this.taoHistoricalInvoice = taoHistoricalInvoice;
            this.canInvoiceAmount = canInvoiceAmount;
        }

        //设定历史开票总额
        public void setTaoHistoricalInvoice(String taoHistoricalInvoice) {
            this.taoHistoricalInvoice = taoHistoricalInvoice;
            Double tHI = Double.parseDouble(this.taoHistoricalInvoice);
            //计算并设定可开票金额
            setCanInvoiceAmount((tHI- totalInvoiceAmount)+"");    //总计金额 - 已开票金额
        }

        //得到总计可开票金额
        public Double getTotalInvoiceAmount() {
            return totalInvoiceAmount;
        }

        public String getCanInvoiceAmount() {
            return canInvoiceAmount;
        }

        public String getTaoHistoricalInvoice() {
            return taoHistoricalInvoice;
        }

        public void setCanInvoiceAmount(String canInvoiceAmount) {
            this.canInvoiceAmount = canInvoiceAmount;
        }
    }
